
package com.qdu.servlet;

import com.qdu.dao.UsersDao;
import com.qdu.entity.Admin;
import com.qdu.entity.Users;
import com.qdu.service.AdminService;
import com.qdu.service.UsersService;
import com.qdu.service.impl.AdminServiceImpl;
import com.qdu.service.impl.UsersServiceImpl;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author 24959
 */
@WebServlet("/goubus")
public class GetOneUserByUnoServlet extends HttpServlet{
    UsersService us=new UsersServiceImpl();
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        int Uno=Integer.parseInt(req.getParameter("Uno"));
        Users users=us.getOneByUno(Uno);
        req.setAttribute("users", users);
        req.getRequestDispatcher("/user_info.jsp").forward(req, resp);
    }
    
}
